package com.demo.entity.po;

import java.io.Serializable;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * @Description:帖子/文章表
 * @Date:2025-03-06
 * @author：author
*/
public class PostInfo implements Serializable {

	/**
	 * 帖子/文章ID，主键，自增
	 */
	private Long postId;

	/**
	 * 发帖/写文章用户ID，外键
	 */
	private Long userId;



	/**
	 * 帖子/文章标题
	 */
	private String title;

	/**
	 * 帖子/文章内容
	 */
	private String content;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	/**
	 * 最后更新时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	/**
	 * 状态：1正常、0已删除
	 */
	private Integer status;

	/**
	 * 文章类型：1-普通文章、2-教程、3-公告等
	 */
	private Integer articleType;

	/**
	 * 文章分类ID
	 */
	private Long categoryId;

	/**
	 * 文章标签，多个标签用逗号分隔
	 */
	private String tags;

	/**
	 * 浏览次数
	 */
	private Integer viewCount;

	/**
	 * 点赞次数
	 */
	private Integer likeCount;

	/**
	 * 评论数
	 */
	private Integer commentCount;

	/**
	 * 是否推荐：1-推荐、0-不推荐
	 */
	private Integer isRecommend;

	/**
	 * 文章摘要或简介
	 */
	private String summary;

	/**
	 * 是否允许评论：1-允许、0-不允许
	 */
	private Integer allowComment;

	/**
	 * 是否为草稿：1-草稿、0-正式发布
	 */
	private Integer isDraft;

	/**
	 * 文章字数统计
	 */
	private Integer wordCount;

	/**
	 * 封面分类
	 */
	private Integer coverType;

	/**
	 * 封面路径
	 */
	private String coverPath;



	private String username;


	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public void setPostId(Long postId) {
		this.postId = postId;
	}

	public Long getPostId() {
		return this.postId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getUserId() {
		return this.userId;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTitle() {
		return this.title;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getContent() {
		return this.content;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setArticleType(Integer articleType) {
		this.articleType = articleType;
	}

	public Integer getArticleType() {
		return this.articleType;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public Long getCategoryId() {
		return this.categoryId;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

	public String getTags() {
		return this.tags;
	}

	public void setViewCount(Integer viewCount) {
		this.viewCount = viewCount;
	}

	public Integer getViewCount() {
		return this.viewCount;
	}

	public void setLikeCount(Integer likeCount) {
		this.likeCount = likeCount;
	}

	public Integer getLikeCount() {
		return this.likeCount;
	}

	public void setCommentCount(Integer commentCount) {
		this.commentCount = commentCount;
	}

	public Integer getCommentCount() {
		return this.commentCount;
	}

	public void setIsRecommend(Integer isRecommend) {
		this.isRecommend = isRecommend;
	}

	public Integer getIsRecommend() {
		return this.isRecommend;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getSummary() {
		return this.summary;
	}

	public void setAllowComment(Integer allowComment) {
		this.allowComment = allowComment;
	}

	public Integer getAllowComment() {
		return this.allowComment;
	}

	public void setIsDraft(Integer isDraft) {
		this.isDraft = isDraft;
	}

	public Integer getIsDraft() {
		return this.isDraft;
	}

	public void setWordCount(Integer wordCount) {
		this.wordCount = wordCount;
	}

	public Integer getWordCount() {
		return this.wordCount;
	}

	public void setCoverType(Integer coverType) {
		this.coverType = coverType;
	}

	public Integer getCoverType() {
		return this.coverType;
	}

	public void setCoverPath(String coverPath) {
		this.coverPath = coverPath;
	}

	public String getCoverPath() {
		return this.coverPath;
	}

	@Override
	public String toString() {
		return "帖子/文章ID，主键，自增:" + postId + ",发帖/写文章用户ID，外键:" + userId + ",帖子/文章标题:" + title + ",帖子/文章内容:" + content + ",创建时间:" + createTime + ",最后更新时间:" + updateTime + ",状态：1正常、0已删除:" + status + ",文章类型：1-普通文章、2-教程、3-公告等:" + articleType + ",文章分类ID:" + categoryId + ",文章标签，多个标签用逗号分隔:" + tags + ",浏览次数:" + viewCount + ",点赞次数:" + likeCount + ",评论数:" + commentCount + ",是否推荐：1-推荐、0-不推荐:" + isRecommend + ",文章摘要或简介:" + summary + ",是否允许评论：1-允许、0-不允许:" + allowComment + ",是否为草稿：1-草稿、0-正式发布:" + isDraft + ",文章字数统计:" + wordCount + ",封面分类:" + coverType + ",封面路径:" + coverPath + "";
	}

}